<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .parent {
            display: flex;
            flex-direction: column;
            height: 100vh;
        }

        .child:nth-child(1) {
            height: 100%;
        }
        .child:nth-child(2) {
            height: 40px;
            border-top: 1px solid;
            box-sizing: border-box;
        }
    </style>
</head>

<body>
    <div class="parent">
        <div class="child"></div>
        <div class="child"></div>
    </div>
</body>

</html>